<?php

class Car{
      public $carMode;
	  public $carBand;
	  public $weight;
	  public $speed;

      function getweight(){
      	return $this->weight;
      }
      function getspeed(){
      	return $this->speed;
      }

}

$car1 = new car();
$car1->carMode = "捷达";
$car1->carBand = "大众";
$car1->weight = 1.5;
$car1->speed = 160;
echo $car1->weight;
echo $car1->getweight();
echo $car1->getSpeed();